package com.library.dto.vo;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;

@Data
public class MyAnswer1 {
	private String[] question16;
	private String[] question17;
	private String[] question18;
	private String[] question19;
	private String[] question20;
	public static List<String> getName() {	
		Class c=MyAnswer1.class;
        //获取该类的成员变量
        Field[] declaredFields = c.getDeclaredFields();
        List<String> myname=new ArrayList<String>();
        for (Field field : declaredFields) {
            myname.add(field.getName());
        }
        return myname;
	}
	public  String[] getanswer() {
		String[] answer= {"","","","",""};
		if(question16!=null)
		for(String aString:question16) {answer[0]+=aString;}
		if(question17!=null)
		for(String aString:question17) {answer[1]+=aString;}
		if(question18!=null)
		for(String aString:question18) {answer[2]+=aString;}
		if(question19!=null)
		for(String aString:question19) {answer[3]+=aString;}
		if(question20!=null)
		for(String aString:question20) {answer[4]+=aString;}
		return answer ;
	}
}
